﻿@model EntityParentModel[]
@for (int i = 0; i < Model.Length; i++)
{
    <li @Html.Raw(Model[i].Opened ? "class=\" jstree-open\"" : "")>
        <a href="@Html.Raw(Url.Action(Html.ViewContext.RouteData.Values["action"].ToString(), new { size = Request["size"], parentpath = Model[i].Path, parentid = Model[i].Index }))"@Html.Raw(Model[i].Selected ? " class=\"jstree-clicked\"" : "")>@Model[i].Name</a>
        @{if (Model[i].Items.Length > 0)
        {
            <ul>
                @{Html.RenderPartial("ParentView", Model[i].Items);}
            </ul>
        }
        }
    </li>
}